<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
	xmlns:local="clr-namespace:Goldlight.SampleApplication"
	xmlns:marketingvm="clr-namespace:Goldlight.SampleApplication.ViewModels.Marketing"
	xmlns:marketingvw="clr-namespace:Goldlight.SampleApplication.Views.Marketing"
	xmlns:src="clr-namespace:Goldlight.Mvvm.Base;assembly=Goldlight.Mvvm.Base"
	xmlns:vm="clr-namespace:Goldlight.SampleApplication.ViewModels"
	xmlns:vw="clr-namespace:Goldlight.SampleApplication.Views"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
	<SolidColorBrush x:Key="ToolBarGripperSolidBrush" Color="#C6C3C6"/>
	<SolidColorBrush x:Key="BrightBlueSolidBrush1" Color="#FFBFDBFF"/>
	<SolidColorBrush x:Key="BrightBlueSolidBrush2" Color="#FFDFECFF"/>
	<SolidColorBrush x:Key="BlueSolidBrush1" Color="#FF6593CF"/>
	<SolidColorBrush x:Key="BlueSolidBrush2" Color="#FF3D6394"/>
	<SolidColorBrush x:Key="SelectedListItemBlueSolidBrush" Color="#FFA7CDF0"/>
	<SolidColorBrush x:Key="DarkBlueSolidBrush" Color="#FF2B5597"/>
	<SolidColorBrush x:Key="BrightOrangeSolidBrush" Color="#FFFFE7A2"/>
	<SolidColorBrush x:Key="OrangeSolidBrush" Color="#FFFFBD69"/>
	<SolidColorBrush x:Key="DarkOrangeSolidBrush" Color="#FFFB8C3C"/>
	<SolidColorBrush x:Key="InboxExpanderExpandSiteBackground" Color="#FFF7BE57"/>
	<SolidColorBrush x:Key="DropDownGraySolidBrush1" Color="#FFE9EEEE"/>
	<SolidColorBrush x:Key="DropDownGraySolidBrush2" Color="#FFF6F6F6"/>
	<SolidColorBrush x:Key="GraySolidBrush" Color="#FFE5E5E5"/>
	<LinearGradientBrush x:Key="ToolBarBlueGradientBrush" StartPoint="0,0" EndPoint="0,1">
		<GradientStop Offset="0" Color="#FFCEE0F5"/>
		<GradientStop Offset="0.041" Color="#FFDDEEFF"/>
		<GradientStop Offset="0.5" Color="#FFE5F0FD"/>
		<GradientStop Offset="1" Color="#FFAECBEF"/>
	</LinearGradientBrush>
	<SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFEEEEEE"/>
	<SolidColorBrush x:Key="HighlightBackgroundBrush" Color="#FF97B2D7"/>
	<SolidColorBrush x:Key="HighlightForegroundBrush" Color="#FFFFFFFF"/>
	<SolidColorBrush x:Key="HighlightBorderBrush" Color="#00FFFFFF"/>
	<SolidColorBrush x:Key="GlyphBrush" Color="#4971AA"/>
	<SolidColorBrush x:Key="NormalBorderBrush" Color="#9ABAE6"/>
	<SolidColorBrush x:Key="NormalForegroundBrush" Color="#4971A3"/>
	<LinearGradientBrush x:Key="NormalBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
		<GradientBrush.GradientStops>
			<GradientStopCollection>
				<GradientStop Offset="0.0" Color="#DFE9F6"/>
				<GradientStop Offset="1.0" Color="#C7D8EE"/>
			</GradientStopCollection>
		</GradientBrush.GradientStops>
	</LinearGradientBrush>
	<SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888"/>
	<SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE"/>
	<SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA"/>
	<SolidColorBrush x:Key="LightBorderBrush" Color="#AAA"/>
	<LinearGradientBrush x:Key="BlueBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
		<GradientBrush.GradientStops>
			<GradientStopCollection>
				<GradientStop Offset="0.0" Color="#C8D8ED"/>
				<GradientStop Offset="1.0" Color="#DDEDF9"/>
			</GradientStopCollection>
		</GradientBrush.GradientStops>
	</LinearGradientBrush>
	<LinearGradientBrush x:Key="PressedBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
		<GradientBrush.GradientStops>
			<GradientStopCollection>
				<GradientStop Offset="0.0" Color="#EEF7FF"/>
				<GradientStop Offset="0.5" Color="#C5DBF6"/>
				<GradientStop Offset="1.0" Color="#EEF7FF"/>
			</GradientStopCollection>
		</GradientBrush.GradientStops>
	</LinearGradientBrush>
	<SolidColorBrush x:Key="PressedBorderBrush" Color="#AAA"/>
	<LinearGradientBrush x:Key="ScrollBarBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
		<LinearGradientBrush.GradientStops>
			<GradientStop Offset="0" Color="#FFEEEDE5"/>
			<GradientStop Offset="0.05" Color="#FFEEEDE5"/>
			<GradientStop Offset="0.06" Color="#FFF3F1EC"/>
			<GradientStop Offset="0.94" Color="#FFFEFEFE"/>
			<GradientStop Offset="0.95" Color="#FFEEEDE5"/>
			<GradientStop Offset="1" Color="#FFEEEDE5"/>
		</LinearGradientBrush.GradientStops>
	</LinearGradientBrush>
	<Style TargetType="{x:Type TabItem}">
		<Style.Triggers>
			<EventTrigger RoutedEvent="Loaded">
				<BeginStoryboard>
					<Storyboard>
						<DoubleAnimation
							Duration="0:0:0.5"
							FillBehavior="HoldEnd"
							From="0"
							Storyboard.TargetProperty="Opacity"
							To="1"/>
					</Storyboard>
				</BeginStoryboard>
			</EventTrigger>
		</Style.Triggers>
		<Setter Property="TextElement.Foreground" Value="{StaticResource NormalForegroundBrush}"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type TabItem}">
					<Grid>
						<local:CloseTab
							Name="Border"
							Margin="0,0,-12,-2"
							Background="{StaticResource NormalBackgroundBrush}"
							BorderBrush="{StaticResource NormalBorderBrush}"
							BorderThickness="1"
							CornerRadius="3"
							SnapsToDevicePixels="True">
							<Grid>
								<Grid.ColumnDefinitions>
									<ColumnDefinition/>
									<ColumnDefinition/>
								</Grid.ColumnDefinitions>
								<ContentPresenter
									x:Name="ContentSite"
									Grid.Column="1"
									HorizontalAlignment="Center"
									Margin="0,2,7,4"
									VerticalAlignment="Center"
									ContentSource="Header"
									RecognizesAccessKey="True" />
							</Grid>
						</local:CloseTab>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsSelected" Value="True">
							<Setter Property="Panel.ZIndex" Value="1000"/>
							<Setter TargetName="Border" Property="Background" Value="{StaticResource PressedBackgroundBrush}"/>
							<Setter TargetName="Border" Property="Margin" Value="0,0,-12,-3"/>
							<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource PressedBorderBrush}"/>
						</Trigger>
						<Trigger Property="IsEnabled" Value="False">
							<Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}"/>
							<Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}"/>
							<Setter TargetName="Border" Property="BorderThickness" Value="1"/>
							<Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

    <Style x:Key="MenuItemStyle" TargetType="{x:Type MenuItem}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="Background" Value="#00FFFFFF"/>
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}"/>
        <Setter Property="BorderThickness" Value="0.7"/>
        <Setter Property="Margin" Value="0,1,0,0"/>
        <Setter Property="Padding" Value="8,3,8,3"/>
        <Setter Property="DockPanel.Dock" Value="Top"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type MenuItem}">
                    <Grid SnapsToDevicePixels="True" Background="#00FFFFFF">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition SharedSizeGroup="MenuItemIconColumnGroup" MinWidth="24" Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition SharedSizeGroup="MenuItemIGTColumnGroup" Width="Auto"/>
                            <ColumnDefinition Width="14"/>
                        </Grid.ColumnDefinitions>
                        <Border Margin="1,0,1,0" x:Name="Border" Grid.ColumnSpan="4" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                        <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="0" x:Name="Icon" VerticalAlignment="Center" Content="{TemplateBinding Icon}" ContentSource="Icon"/>
                        <Border Visibility="Hidden" Margin="0,1,0,1" x:Name="GlyphPanel" Width="20" Height="20" Background="#FFE6F0FA" BorderBrush="#FF3399FF" BorderThickness="0.7">
                            <Path Stroke="{TemplateBinding Foreground}" StrokeThickness="1.2" FlowDirection="LeftToRight" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M0,2.5L2.5,5 7,0.5"/>
                        </Border>
                        <ContentPresenter VerticalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" Grid.Column="1" Content="{TemplateBinding Header}" ContentSource="Header" ContentTemplate="{TemplateBinding HeaderTemplate}" RecognizesAccessKey="True"/>
                        <TextBlock HorizontalAlignment="Right" VerticalAlignment="Center" Margin="4,3,2,3" Grid.Column="2" Text="{TemplateBinding InputGestureText}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="Icon" Value="{x:Null}">
                            <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible"/>
                            <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="IsHighlighted" Value="True">
                            <Setter Property="BorderBrush" TargetName="Border" Value="#FF3399FF"/>
                            <Setter Property="Background" TargetName="Border" Value="#FFC2E0FF"/>
                            <Setter Property="BorderBrush" TargetName="GlyphPanel" Value="#FF3399FF"/>
                            <Setter Property="Background" TargetName="GlyphPanel" Value="#FF99CCFF"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Role" Value="TopLevelHeader">
                <Setter Property="Padding" Value="6,2,7,2"/>
                <Setter Property="Grid.IsSharedSizeScope" Value="True"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type MenuItem}">
                            <Border SnapsToDevicePixels="True" x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0.7">
                                <DockPanel x:Name="Header">
                                    <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="4,0,6,0" x:Name="Icon" VerticalAlignment="Center" Content="{TemplateBinding Icon}" ContentSource="Icon"/>
                                    <Path Visibility="Collapsed" Stroke="{TemplateBinding Foreground}" StrokeThickness="1.2" FlowDirection="LeftToRight" Margin="4,0,6,0" x:Name="GlyphPanel" VerticalAlignment="Center" Data="M0,2.5L2.5,5 7,0.5"/>
                                    <ContentPresenter VerticalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Header}" ContentSource="Header" ContentTemplate="{TemplateBinding HeaderTemplate}" RecognizesAccessKey="True"/>
                                    <Popup Focusable="False" AllowsTransparency="True" HorizontalOffset="-1" IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" x:Name="PART_Popup">
                                        <Microsoft_Windows_Themes:SystemDropShadowChrome x:Name="Shdw" Color="#00FFFFFF">
                                            <Border Background="{DynamicResource DropDownGraySolidBrush2}" BorderBrush="{DynamicResource DarkBlueSolidBrush}" BorderThickness="0.7" x:Name="border">
                                                <Grid Grid.IsSharedSizeScope="True">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition SharedSizeGroup="MenuItemIconColumnGroup" MinWidth="24" Width="Auto"/>
                                                        <ColumnDefinition Width="*"/>
                                                    </Grid.ColumnDefinitions>
                                                    <Rectangle Margin="0,0,0,0" Fill="{DynamicResource DropDownGraySolidBrush1}"/>
                                                    <Rectangle Fill="#00F6F6F6" HorizontalAlignment="Left" Margin="0,-1,0,0" VerticalAlignment="Top" Width="{Binding Path=ActualWidth, ElementName=Header}" Height="{Binding Path=ActualHeight, ElementName=Header}" Grid.ColumnSpan="2"/>
                                                    <ScrollViewer Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}" Grid.ColumnSpan="2" CanContentScroll="True">
                                                        <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="0,0,0,1" KeyboardNavigation.DirectionalNavigation="Cycle" KeyboardNavigation.TabNavigation="Cycle"/>
                                                    </ScrollViewer>
                                                </Grid>
                                            </Border>
                                        </Microsoft_Windows_Themes:SystemDropShadowChrome>
                                    </Popup>
                                </DockPanel>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsSuspendingPopupAnimation" Value="True">
                                    <Setter Property="PopupAnimation" TargetName="PART_Popup" Value="None"/>
                                </Trigger>
                                <Trigger Property="Icon" Value="{x:Null}">
                                    <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
                                </Trigger>
                                <Trigger Property="IsChecked" Value="True">
                                    <Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible"/>
                                    <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
                                </Trigger>
                                <Trigger Property="IsHighlighted" Value="True">
                                    <Setter Property="Background" TargetName="Border" Value="{DynamicResource MouseOverOrangeGradientBrush3}" />
                                    <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource OrangeSolidBrush}"/>
                                </Trigger>
                                <Trigger Property="IsSubmenuOpen" Value="True">
                                    <Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource DarkBlueSolidBrush}"/>
                                    <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource DarkBlueSolidBrush}"/>
                                    <Setter Property="Background" TargetName="Border" Value="{DynamicResource BlueGradientBrush}" />
                                </Trigger>
                                <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="True">
                                    <Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/>
                                    <Setter Property="SnapsToDevicePixels" TargetName="Shdw" Value="True"/>
                                    <Setter Property="Color" TargetName="Shdw" Value="#71000000"/>
                                </Trigger>
                                <Trigger Property="IsEnabled" Value="False">
                                    <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger Property="Role" Value="TopLevelItem">
                <Setter Property="Margin" Value="0,1,0,1"/>
                <Setter Property="Padding" Value="7,1,8,2"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type MenuItem}">
                            <Border SnapsToDevicePixels="True" x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0.7">
                                <DockPanel>
                                    <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="4,0,6,0" x:Name="Icon" VerticalAlignment="Center" Content="{TemplateBinding Icon}" ContentSource="Icon"/>
                                    <Path Visibility="Collapsed" Stroke="{TemplateBinding Foreground}" StrokeThickness="1.2" FlowDirection="LeftToRight" Margin="4,0,6,0" x:Name="GlyphPanel" VerticalAlignment="Center" Data="M0,2.5L2.5,5 7,0.5"/>
                                    <ContentPresenter VerticalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Header}" ContentSource="Header" ContentTemplate="{TemplateBinding HeaderTemplate}" RecognizesAccessKey="True"/>
                                </DockPanel>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="Icon" Value="{x:Null}">
                                    <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
                                </Trigger>
                                <Trigger Property="IsChecked" Value="True">
                                    <Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible"/>
                                    <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
                                </Trigger>
                                <Trigger Property="IsHighlighted" Value="True">
                                    <Setter Property="BorderBrush" TargetName="Border" Value="#FF3399FF"/>
                                    <Setter Property="Background" TargetName="Border" Value="#FFC2E0FF"/>
                                </Trigger>
                                <Trigger Property="IsEnabled" Value="False">
                                    <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
            <Trigger Property="Role" Value="SubmenuHeader">
                <Setter Property="DockPanel.Dock" Value="Top"/>
                <Setter Property="Padding" Value="8,3,8,3"/>
                <Setter Property="Grid.IsSharedSizeScope" Value="True"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type MenuItem}">
                            <Grid SnapsToDevicePixels="True" Background="#00FFFFFF">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition SharedSizeGroup="MenuItemIconColumnGroup" MinWidth="24" Width="Auto"/>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition SharedSizeGroup="MenuItemIGTColumnGroup" Width="Auto"/>
                                    <ColumnDefinition Width="14"/>
                                </Grid.ColumnDefinitions>
                                <Border Margin="1,0,1,0" x:Name="Border" Grid.ColumnSpan="4" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                                <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="3,3,3,3" x:Name="Icon" VerticalAlignment="Center" Content="{TemplateBinding Icon}" ContentSource="Icon"/>
                                <Border Visibility="Hidden" Margin="0,1,0,1" x:Name="GlyphPanel" Width="20" Height="20" Background="#FFE6F0FA" BorderBrush="#FF3399FF" BorderThickness="0.7">
                                    <Path Stroke="{TemplateBinding Foreground}" StrokeThickness="1.2" FlowDirection="LeftToRight" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M0,2.5L2.5,5 7,0.5"/>
                                </Border>
                                <ContentPresenter VerticalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" Grid.Column="1" Content="{TemplateBinding Header}" ContentSource="Header" ContentTemplate="{TemplateBinding HeaderTemplate}" RecognizesAccessKey="True"/>
                                <Path Fill="{TemplateBinding Foreground}" Margin="4,0,6,0" VerticalAlignment="Center" Grid.Column="3" Data="M0,0L4,3.5 0,7z" DockPanel.Dock="Right"/>
                                <Popup Focusable="False" AllowsTransparency="True" IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" x:Name="PART_Popup">
                                    <Microsoft_Windows_Themes:SystemDropShadowChrome x:Name="Shdw" Color="#00FFFFFF">
                                        <Border Grid.IsSharedSizeScope="True" Background="#FFFDFDFD" BorderBrush="#FF808080" BorderThickness="0.7">
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition SharedSizeGroup="MenuItemIconColumnGroup" MinWidth="24" Width="Auto"/>
                                                    <ColumnDefinition Width="*"/>
                                                </Grid.ColumnDefinitions>
                                                <Rectangle Margin="0,1,0,1">
                                                    <Rectangle.Fill>
                                                        <LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
                                                            <GradientStop Color="#FFFFFFFF" Offset="0"/>
                                                            <GradientStop Color="#FFFFFBFF" Offset="0.5"/>
                                                            <GradientStop Color="#FFF7F7F7" Offset="1"/>
                                                        </LinearGradientBrush>
                                                    </Rectangle.Fill>
                                                </Rectangle>
                                                <ScrollViewer Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}" Grid.ColumnSpan="2" CanContentScroll="True">
                                                    <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="0,0,0,1" KeyboardNavigation.DirectionalNavigation="Cycle" KeyboardNavigation.TabNavigation="Cycle"/>
                                                </ScrollViewer>
                                            </Grid>
                                        </Border>
                                    </Microsoft_Windows_Themes:SystemDropShadowChrome>
                                </Popup>
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsSuspendingPopupAnimation" Value="True">
                                    <Setter Property="PopupAnimation" TargetName="PART_Popup" Value="None"/>
                                </Trigger>
                                <Trigger Property="Icon" Value="{x:Null}">
                                    <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
                                </Trigger>
                                <Trigger Property="IsChecked" Value="True">
                                    <Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible"/>
                                    <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
                                </Trigger>
                                <Trigger Property="IsHighlighted" Value="True">
                                    <Setter Property="BorderBrush" TargetName="Border" Value="#FF3399FF"/>
                                    <Setter Property="Background" TargetName="Border" Value="#FFC2E0FF"/>
                                    <Setter Property="BorderBrush" TargetName="GlyphPanel" Value="#FF3399FF"/>
                                    <Setter Property="Background" TargetName="GlyphPanel" Value="#FF99CCFF"/>
                                </Trigger>
                                <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="True">
                                    <Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/>
                                    <Setter Property="SnapsToDevicePixels" TargetName="Shdw" Value="True"/>
                                    <Setter Property="Color" TargetName="Shdw" Value="#71000000"/>
                                </Trigger>
                                <Trigger Property="IsEnabled" Value="False">
                                    <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="SubmenuItemStyle" TargetType="{x:Type MenuItem}">
        <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Template" Value="{DynamicResource {ComponentResourceKey ResourceId=SubmenuItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}"/>
        <Style.Triggers>
            <Trigger Property="Role" Value="TopLevelHeader">
                <Setter Property="Padding" Value="7,2,8,3"/>
                <Setter Property="Template" Value="{DynamicResource {ComponentResourceKey ResourceId=TopLevelHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}"/>
            </Trigger>
            <Trigger Property="Role" Value="TopLevelItem">
                <Setter Property="Padding" Value="7,2,8,3"/>
                <Setter Property="Template" Value="{DynamicResource {ComponentResourceKey ResourceId=TopLevelItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}"/>
            </Trigger>
            <Trigger Property="Role" Value="SubmenuHeader">
                <Setter Property="Padding" Value="2,3,2,3"/>
                <Setter Property="Template" Value="{DynamicResource {ComponentResourceKey ResourceId=SubmenuHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}}"/>
            </Trigger>
            <Trigger Property="Role" Value="SubmenuItem">
                <Setter Property="Padding" Value="2,3,2,3"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="{ComponentResourceKey ResourceId=SubmenuItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}" TargetType="{x:Type MenuItem}">
        <Grid SnapsToDevicePixels="true">
            <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.7" x:Name="Bg"/>
            <Rectangle Margin="1" StrokeThickness="0.7" x:Name="InnerBorder"/>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="24" Width="Auto" SharedSizeGroup="MenuItemIconColumnGroup"/>
                    <ColumnDefinition Width="4"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="37"/>
                    <ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup"/>
                    <ColumnDefinition Width="17"/>
                </Grid.ColumnDefinitions>
                <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="1" x:Name="Icon" VerticalAlignment="Center" ContentSource="Icon"/>
                <Border Visibility="Hidden" Margin="2" x:Name="GlyphPanel" Width="22" Height="22" Background="{DynamicResource DarkOrangeSolidBrush}" BorderBrush="{DynamicResource DarkOrangeSolidBrush}" BorderThickness="0.7" HorizontalAlignment="Center" VerticalAlignment="Center">
                    <Path Fill="Black" FlowDirection="LeftToRight" x:Name="Glyph" Width="9" Height="11" Data="{DynamicResource Checkmark}"/>
                </Border>
                <ContentPresenter VerticalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" Grid.Column="2" ContentSource="Header" RecognizesAccessKey="True"/>
                <TextBlock HorizontalAlignment="Right" VerticalAlignment="Center" Margin="{TemplateBinding Padding}" Grid.Column="4" Text="{TemplateBinding InputGestureText}"/>
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="Icon" Value="{x:Null}">
                <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="IsChecked" Value="true">
                <Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible"/>
                <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="IsHighlighted" Value="true">
                <Setter Property="Stroke" TargetName="InnerBorder" Value="{DynamicResource DarkOrangeSolidBrush}"/>
                <Setter Property="Fill" TargetName="InnerBorder" Value="{DynamicResource BrightOrangeSolidBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="#FF9A9A9A"/>
                <Setter Property="Background" TargetName="GlyphPanel" Value="#EEE9E9"/>
                <Setter Property="BorderBrush" TargetName="GlyphPanel" Value="#DBD6D6"/>
                <Setter Property="Fill" TargetName="Glyph" Value="#848589"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <ControlTemplate x:Key="{ComponentResourceKey ResourceId=SubmenuContent, TypeInTargetAssembly={x:Type FrameworkElement}}" TargetType="{x:Type ContentControl}">
        <Border Background="#F5F5F5" BorderBrush="#FF959595" BorderThickness="1">
            <Grid>
                <Rectangle Fill="#F1F1F1" RadiusX="2" RadiusY="2" HorizontalAlignment="Left" Margin="2" Width="28"/>
                <Rectangle Fill="#E2E3E3" HorizontalAlignment="Left" Margin="30,2,0,2" Width="1"/>
                <Rectangle Fill="White" HorizontalAlignment="Left" Margin="31,2,0,2" Width="1"/>
                <ContentPresenter Margin="1,0" Grid.ColumnSpan="2"/>
            </Grid>
        </Border>
    </ControlTemplate>

    <LinearGradientBrush x:Key="MenuItemPressedFill" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#28717070" Offset="0"/>
        <GradientStop Color="#50717070" Offset="0.75"/>
        <GradientStop Color="#90717070" Offset="1"/>
    </LinearGradientBrush>

    <Geometry x:Key="Checkmark">M 0,5.1 L 1.7,5.2 L 3.4,7.1 L 8,0.4 L 9.2,0 L 3.3,10.8 Z</Geometry>
    <Geometry x:Key="RightArrow">M 0,0 L 4,3.5 L 0,7 Z</Geometry>
    <Geometry x:Key="UpArrow">M 0,4 L 3.5,0 L 7,4 Z</Geometry>
    <Geometry x:Key="DownArrow">M 0,0 L 3.5,4 L 7,0 Z</Geometry>

    <ControlTemplate x:Key="{ComponentResourceKey ResourceId=TopLevelHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}" TargetType="{x:Type MenuItem}">
        <Grid SnapsToDevicePixels="true">
            <Rectangle RadiusX="2" RadiusY="2" x:Name="OuterBorder"/>
            <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" RadiusX="1" RadiusY="1" Margin="1" x:Name="Bg"/>
            <Rectangle Margin="2" x:Name="InnerBorder"/>
            <DockPanel>
                <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="4,0,6,0" x:Name="Icon" VerticalAlignment="Center" ContentSource="Icon"/>
                <Path Visibility="Collapsed" Fill="{TemplateBinding Foreground}" FlowDirection="LeftToRight" Margin="7,0,0,0" x:Name="GlyphPanel" VerticalAlignment="Center" Data="{StaticResource Checkmark}"/>
                <ContentPresenter VerticalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" ContentSource="Header" RecognizesAccessKey="True"/>
            </DockPanel>
            <Popup Focusable="false" AllowsTransparency="true" HorizontalOffset="0" IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" VerticalOffset="-1" x:Name="PART_Popup">
                <Microsoft_Windows_Themes:SystemDropShadowChrome x:Name="Shdw" Color="Transparent">
                    <ContentControl x:Name="SubMenuBorder" IsTabStop="false" Template="{DynamicResource {ComponentResourceKey ResourceId=SubmenuContent, TypeInTargetAssembly={x:Type FrameworkElement}}}">
                        <ScrollViewer Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}" CanContentScroll="true">
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="2" Grid.IsSharedSizeScope="true" KeyboardNavigation.DirectionalNavigation="Cycle" KeyboardNavigation.TabNavigation="Cycle"/>
                        </ScrollViewer>
                    </ContentControl>
                </Microsoft_Windows_Themes:SystemDropShadowChrome>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsSuspendingPopupAnimation" Value="true">
                <Setter Property="PopupAnimation" TargetName="PART_Popup" Value="None"/>
            </Trigger>
            <Trigger Property="Icon" Value="{x:Null}">
                <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="IsChecked" Value="true">
                <Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible"/>
                <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
                <Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/>
                <Setter Property="Color" TargetName="Shdw" Value="#71000000"/>
            </Trigger>
            <Trigger Property="IsHighlighted" Value="true">
                <Setter Property="Stroke" TargetName="InnerBorder" Value="{DynamicResource DarkOrangeSolidBrush}"/>
                <Setter Property="Fill" TargetName="InnerBorder" Value="{DynamicResource BrightOrangeSolidBrush}" />
            </Trigger>
            <Trigger Property="IsKeyboardFocused" Value="true">
                <Setter Property="Stroke" TargetName="Bg" Value="#E0717070"/>
                <Setter Property="Fill" TargetName="Bg" Value="{StaticResource MenuItemPressedFill}"/>
                <Setter Property="Stroke" TargetName="InnerBorder" Value="#50747272"/>
            </Trigger>
            <Trigger Property="IsSubmenuOpen" Value="true">
                <Setter Property="Stroke" TargetName="Bg" Value="#E0717070"/>
                <Setter Property="Fill" TargetName="Bg" Value="{StaticResource MenuItemPressedFill}"/>
                <Setter Property="Stroke" TargetName="InnerBorder" Value="#50747272"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="#FF9A9A9A"/>
                <Setter Property="Fill" TargetName="GlyphPanel" Value="#848589"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <ControlTemplate x:Key="{ComponentResourceKey ResourceId=TopLevelItemTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}" TargetType="{x:Type MenuItem}">
        <Grid SnapsToDevicePixels="true">
            <Rectangle RadiusX="2" RadiusY="2" x:Name="OuterBorder"/>
            <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="0.7" Margin="1" x:Name="Bg"/>
            <Rectangle Margin="2" x:Name="InnerBorder" StrokeThickness="0.7"/>
            <DockPanel>
                <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="4,0,6,0" x:Name="Icon" VerticalAlignment="Center" ContentSource="Icon"/>
                <Path Visibility="Collapsed" Fill="{TemplateBinding Foreground}" FlowDirection="LeftToRight" Margin="7,0,0,0" x:Name="GlyphPanel" VerticalAlignment="Center" Data="{StaticResource Checkmark}"/>
                <ContentPresenter VerticalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" ContentSource="Header" RecognizesAccessKey="True"/>
            </DockPanel>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="Icon" Value="{x:Null}">
                <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="IsChecked" Value="true">
                <Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible"/>
                <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="IsHighlighted" Value="true">
                <Setter Property="Stroke" TargetName="InnerBorder" Value="{DynamicResource DarkOrangeSolidBrush}"/>
                <Setter Property="Fill" TargetName="InnerBorder" Value="{DynamicResource BrightOrangeSolidBrush}" />
            </Trigger>
            <Trigger Property="IsKeyboardFocused" Value="true">
                <Setter Property="Stroke" TargetName="Bg" Value="#E0717070"/>
                <Setter Property="Fill" TargetName="Bg" Value="{StaticResource MenuItemPressedFill}"/>
                <Setter Property="Stroke" TargetName="InnerBorder" Value="#50747272"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="#FF9A9A9A"/>
                <Setter Property="Fill" TargetName="GlyphPanel" Value="#848589"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <ControlTemplate x:Key="{ComponentResourceKey ResourceId=SubmenuHeaderTemplateKey, TypeInTargetAssembly={x:Type MenuItem}}" TargetType="{x:Type MenuItem}">
        <Grid SnapsToDevicePixels="true">
            <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" RadiusX="2" RadiusY="2" x:Name="Bg"/>
            <Rectangle Stroke="Transparent" StrokeThickness="0.7" Margin="1" x:Name="InnerBorder"/>
            <Grid x:Name="Grid">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="24" Width="Auto" SharedSizeGroup="MenuItemIconColumnGroup"/>
                    <ColumnDefinition Width="4"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="37"/>
                    <ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup"/>
                    <ColumnDefinition Width="17"/>
                </Grid.ColumnDefinitions>
                <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="1" x:Name="Icon" VerticalAlignment="Center" ContentSource="Icon"/>
                <Border Visibility="Hidden" Margin="1" x:Name="GlyphPanel" Width="22" Height="22" Background="{DynamicResource DarkOrangeSolidBrush}" BorderBrush="{DynamicResource DarkOrangeSolidBrush}" BorderThickness="1" CornerRadius="3">
                    <Path Fill="#0C12A1" FlowDirection="LeftToRight" x:Name="Glyph" Width="9" Height="11" Data="{StaticResource Checkmark}"/>
                </Border>
                <ContentPresenter VerticalAlignment="Center" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" Grid.Column="2" ContentSource="Header" RecognizesAccessKey="True"/>
                <TextBlock Visibility="Collapsed" VerticalAlignment="Center" Margin="{TemplateBinding Padding}" Grid.Column="4" Text="{TemplateBinding InputGestureText}"/>
                <Path Fill="{TemplateBinding Foreground}" Margin="4,0,0,0" VerticalAlignment="Center" Grid.Column="5" Data="{StaticResource RightArrow}"/>
            </Grid>
            <Popup Focusable="False" AllowsTransparency="True" IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Right"  PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}" x:Name="PART_Popup">
                <Microsoft_Windows_Themes:SystemDropShadowChrome x:Name="Shdw" Color="#00FFFFFF">
                    <Border Background="{DynamicResource DropDownGraySolidBrush2}" BorderBrush="{DynamicResource DarkBlueSolidBrush}" BorderThickness="0.7" x:Name="border">
                        <Grid Grid.IsSharedSizeScope="True">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition SharedSizeGroup="MenuItemIconColumnGroup" MinWidth="24" Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Rectangle Margin="0,0,0,0" Fill="{DynamicResource DropDownGraySolidBrush1}"/>
                            <Rectangle Fill="#00F6F6F6" HorizontalAlignment="Left" Margin="0,-1,0,0" VerticalAlignment="Top" Width="{Binding Path=ActualWidth, ElementName=Header}" Height="{Binding Path=ActualHeight, ElementName=Header}" Grid.ColumnSpan="2"/>
                            <ScrollViewer Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer, TypeInTargetAssembly={x:Type FrameworkElement}}}" Grid.ColumnSpan="2" CanContentScroll="True">
                                <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="0,0,0,1" KeyboardNavigation.DirectionalNavigation="Cycle" KeyboardNavigation.TabNavigation="Cycle"/>
                            </ScrollViewer>
                        </Grid>
                    </Border>
                </Microsoft_Windows_Themes:SystemDropShadowChrome>
            </Popup>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsSuspendingPopupAnimation" Value="true">
                <Setter Property="PopupAnimation" TargetName="PART_Popup" Value="None"/>
            </Trigger>
            <Trigger Property="IsHighlighted" Value="true">
                <Setter Property="Stroke" TargetName="InnerBorder" Value="{DynamicResource DarkOrangeSolidBrush}"/>
                <Setter Property="Fill" TargetName="InnerBorder" Value="{DynamicResource BrightOrangeSolidBrush}" />
            </Trigger>
            <Trigger Property="Icon" Value="{x:Null}">
                <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="IsChecked" Value="true">
                <Setter Property="Visibility" TargetName="GlyphPanel" Value="Visible"/>
                <Setter Property="Visibility" TargetName="Icon" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
                <Setter Property="Margin" TargetName="Shdw" Value="0,0,5,5"/>
                <Setter Property="Color" TargetName="Shdw" Value="#71000000"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="#FF9A9A9A"/>
                <Setter Property="Background" TargetName="GlyphPanel" Value="#EEE9E9"/>
                <Setter Property="BorderBrush" TargetName="GlyphPanel" Value="#DBD6D6"/>
                <Setter Property="Fill" TargetName="Glyph" Value="#848589"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <Style TargetType="TabControl">
		<Setter Property="TextElement.Foreground" Value="{StaticResource NormalForegroundBrush}"/>
		<Setter Property="Control.Padding" Value="4,8,4,4"/>
		<Setter Property="Border.BorderThickness" Value="1"/>
		<Setter Property="Border.BorderBrush" Value="{StaticResource PressedBorderBrush}"/>
		<Setter Property="Panel.Background" Value="{StaticResource PressedBackgroundBrush}"/>
		<Setter Property="Control.HorizontalContentAlignment" Value="Center"/>
		<Setter Property="Control.VerticalContentAlignment" Value="Center"/>
		<Setter Property="Control.Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type TabControl}">
					<Grid ClipToBounds="True" KeyboardNavigation.TabNavigation="Local" SnapsToDevicePixels="True">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Name="ColumnDefinition0"/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="*"/>
						</Grid.RowDefinitions>
						<TabPanel
							Name="HeaderPanel"
							Grid.Column="0"
							Grid.Row="0"
							Margin="4,4,4,0"
							Panel.ZIndex="1"
							IsItemsHost="True"
							KeyboardNavigation.TabIndex="1"/>
						<Border
							Name="ContentPanel"
							Grid.Column="0"
							Grid.Row="1"
							BorderBrush="{StaticResource PressedBorderBrush}"
							BorderThickness="0,0,1,1"
							KeyboardNavigation.DirectionalNavigation="Contained"
							KeyboardNavigation.TabIndex="2"
							KeyboardNavigation.TabNavigation="Local"
							SnapsToDevicePixels="True">
							<Border BorderBrush="{TemplateBinding Border.BorderBrush}" BorderThickness="{TemplateBinding Border.BorderThickness}">
								<Border Background="{TemplateBinding Panel.Background}">
									<ContentPresenter
										Name="PART_SelectedContentHost"
										Margin="{TemplateBinding Control.Padding}"
										Content="{TemplateBinding TabControl.SelectedContent}"
										ContentSource="SelectedContent"
										ContentTemplate="{TemplateBinding TabControl.SelectedContentTemplate}"
										SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"/>
								</Border>
							</Border>
						</Border>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="UIElement.IsEnabled" Value="False">
							<Setter Property="TextElement.Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<LinearGradientBrush x:Key="PanelBrush" StartPoint="0.5,0" EndPoint="0.5,1">
		<GradientStop Offset="0" Color="#FFC9DFFC"/>
		<GradientStop Offset="1" Color="#FFE7F1FF"/>
	</LinearGradientBrush>
	<SolidColorBrush x:Key="HeadlineBrush" Color="#FF0C50A9"/>
	<DataTemplate x:Key="CommandsTemplate">
		<ItemsControl Margin="6,2" IsTabStop="False" ItemsSource="{Binding}">
			<ItemsControl.ItemTemplate>
				<DataTemplate>
					<TextBlock Margin="2,6">
						<Hyperlink Command="{Binding Path=Command}">
							<TextBlock Text="{Binding Path=Label}"/>
						</Hyperlink>
					</TextBlock>
				</DataTemplate>
			</ItemsControl.ItemTemplate>
		</ItemsControl>
	</DataTemplate>
	<LinearGradientBrush x:Key="HeaderBackground" StartPoint="0.5,0" EndPoint="0.5,1">
		<GradientStop Offset="0" Color="#FFC9DFFC"/>
		<GradientStop Offset="1" Color="#FFE7F1FF"/>
	</LinearGradientBrush>
	<Style x:Key="MainPageStyle" TargetType="{x:Type HeaderedContentControl}">
		<Setter Property="HeaderTemplate">
			<Setter.Value>
				<DataTemplate>
					<Border
						Margin="2"
						Background="{StaticResource HeaderBackground}"
						BorderBrush="LightGray"
						BorderThickness="1"
						CornerRadius="5,5,0,0"
						Padding="4"
						SnapsToDevicePixels="True">
						<TextBlock
							HorizontalAlignment="Center"
							FontSize="14"
							FontWeight="Bold"
							Foreground="Blue"
							Text="{TemplateBinding Content}"/>
					</Border>
				</DataTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="IsTabStop" Value="False"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type HeaderedContentControl}">
					<DockPanel LastChildFill="True">
						<ContentPresenter ContentSource="Header" ContentTemplate="{TemplateBinding HeaderTemplate}" DockPanel.Dock="Top"/>
						<ContentPresenter ContentSource="Content" ContentTemplate="{TemplateBinding ContentTemplate}"/>
					</DockPanel>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<!--
  This style ensures that the borders in the main window are consistent.
  -->
	<Style x:Key="MainBorderStyle" TargetType="{x:Type Border}">
		<Setter Property="Background" Value="WhiteSmoke"/>
		<Setter Property="BorderBrush" Value="LightGray"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="CornerRadius" Value="5,5,0,0"/>
		<Setter Property="SnapsToDevicePixels" Value="True"/>
	</Style>
	<DataTemplate DataType="{x:Type vm:HomePageViewModel}">
		<vw:HomePageView Height="350" Padding="10"/>
	</DataTemplate>
	<DataTemplate DataType="{x:Type marketingvm:ContactViewModel}">
		<marketingvw:ContactView Height="350" Padding="10"/>
	</DataTemplate>
	<DataTemplate DataType="{x:Type marketingvm:ContactManagementViewModel}">
		<marketingvw:ContactManagementView Height="350" Padding="10"/>
	</DataTemplate>
	<DataTemplate x:Key="ClosableTabItemTemplate">
		<DockPanel Width="120">
			<Button
				Width="16"
				Height="16"
				Margin="0,1,1,0"
				BorderBrush="{x:Null}"
				Command="{Binding Path=CloseCommand}"
				Content="X"
				Cursor="Hand"
				DockPanel.Dock="Right"
				Focusable="False"
				FontFamily="Courier"
				FontSize="9"
				FontWeight="Bold"
				Foreground="Red"
				Padding="0"
				VerticalContentAlignment="Bottom"
				Visibility="{Binding IsCloseable, Converter={StaticResource BooleanToVisibilityConverter}}"/>
			<ContentPresenter HorizontalAlignment="Right" VerticalAlignment="Center" Content="{Binding Path=Name}"/>
		</DockPanel>
	</DataTemplate>
	<DataTemplate x:Key="WorkspacesTemplate">
		<TabControl
			Margin="4"
			IsSynchronizedWithCurrentItem="True"
			ItemsSource="{Binding}"
			ItemTemplate="{StaticResource ClosableTabItemTemplate}"/>
	</DataTemplate>
	<ContextMenu x:Key="gridContextMenu">
        <MenuItem Command="{Binding AddItemCommand}" Header="{Binding Resources.AddNewMenu}">
            <MenuItem.Icon>
                <Image Source="/Images/add.png" />
            </MenuItem.Icon>
        </MenuItem>
        <MenuItem Header="{Binding Resources.EditMenu}">
            <MenuItem.Icon>
                <Image Source="/Images/accept.png" />
            </MenuItem.Icon>
        </MenuItem>
    </ContextMenu>
</ResourceDictionary>